package models.general;

import play.db.ebean.Model;

import javax.persistence.Entity;
import java.io.File;
import java.util.Date;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: bjornth
 * Date: 17.4.2013
 * Time: 10:59
 * To change this template use File | Settings | File Templates.
 */
@Entity
public class vSkiludVerkefni extends Model {
    public int verkefnaskil_id;
    public int verkefninemenda_id;
    public int nemandi_id;
    public Date dagsetningskilad;
    public File vidhengi;
    public String athugasemd;
    public String svar;
    public String tegund;
    public String texti;
    public int verkefni_id;
    public int verkefnihops_id;
    public String nafn;
    public int spurningar_id;

    public static Finder<Integer,vSkiludVerkefni> find = new Finder<Integer,vSkiludVerkefni>(
            Integer.class, vSkiludVerkefni.class
    );

    public static List<vSkiludVerkefni> getSkilByVerkNemId(int verkefninemenda_id){
        List<vSkiludVerkefni> skiludVerkefni = vSkiludVerkefni.find.where().eq("verkefninemenda_id", verkefninemenda_id).findList();
        return skiludVerkefni;
    }

    public int getVerkefni_id() {
        return verkefni_id;
    }
}
